package com.qf;

import com.qf.pojo.Student;
import com.qf.pojo.User;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * 引导类（起步类）
 * @SpringBootApplication 标记在引导类上
 * 作用：自动创建对象
 *
 *
 * @author YDW
 * projectName:project2202_4
 * time:2022/6/8 21:01
 * description:
 */
@SpringBootApplication
public class SpringBootHelloworld {
    public static void main(String[] args) {
        //创建容器，启动项目
        ConfigurableApplicationContext ac = SpringApplication.run(SpringBootHelloworld.class, args);
//        User user = ac.getBean(User.class);
//        System.out.println(user);
        Student student = ac.getBean(Student.class);
        System.out.println(student);
    }
}
